'''
Created on Feb 2, 2010

@author: oabalbin

This module runs the bfrm software
It need different files to run. 
parameters.txt, dataset.txt, H.txt (optional), ymask.txt (missing data or empty if not missing data)
varin.txt (list of variables in the model
'''

import subprocess


class bfrm_run:
    
    def __init__(self, paramfile, path_to_bfrm):
        self.param = paramfile
        #self.dataset = dataset
        #self.H = H
        #self.ymask = ymask
        #self.varin = varin
        self.path = path_to_bfrm
    
    def execute_bfrm(self):                
        print self.path+"bfrm64", self.param
        subprocess.call([self.path+"bfrm64", self.param])
    
